package org.ezplatform.office.questionnaire.entity;

import java.util.List;
import java.util.Map;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.UniqueConstraint;

import org.ezplatform.core.annotation.MetaData;
import org.ezplatform.core.entity.BaseNativeEntity;

@MetaData(value = "题库题目选项")
@Entity(name = "QuestionnaireSetItems")
@Table(name = "oa_questionnaire_set_items", uniqueConstraints = { @UniqueConstraint(columnNames = "id") })
public class QuestionnaireSetItems  extends BaseNativeEntity{

	private static final long serialVersionUID = 7767175289660423453L;
	
	@MetaData(value = "所属题目Id")
  	@Column(name = "topic_id", nullable = false, length = 32)
    private String topicId;
	
	@MetaData(value = "选项名称")
  	@Column(name = "item_name", length = 100)
    private String itemName;
	
	@MetaData(value = "选项顺序")
  	@Column(name = "sort_no", length = 11)
    private int sortNo;
	
	@MetaData(value = "选项设置")
  	@Column(name = "item_setting", length = 500)
    private String itemSetting;
	
	@Transient
	private List<Map<String,Object>> list;
	
	@Transient
	private Map<String,Object> mapSet;
	
	@Transient
	private String letter;
	
	@Transient
	private QuestionnaireAnswer answer;

	/**
	 * @return the topicId
	 */
	public String getTopicId() {
		return topicId;
	}

	/**
	 * @param topicId the topicId to set
	 */
	public void setTopicId(String topicId) {
		this.topicId = topicId;
	}

	/**
	 * @return the itemName
	 */
	public String getItemName() {
		return itemName;
	}

	/**
	 * @param itemName the itemName to set
	 */
	public void setItemName(String itemName) {
		this.itemName = itemName;
	}

	/**
	 * @return the sortNo
	 */
	public int getSortNo() {
		return sortNo;
	}

	/**
	 * @param sortNo the sortNo to set
	 */
	public void setSortNo(int sortNo) {
		this.sortNo = sortNo;
	}

	/**
	 * @return the itemSetting
	 */
	public String getItemSetting() {
		return itemSetting;
	}

	/**
	 * @param itemSetting the itemSetting to set
	 */
	public void setItemSetting(String itemSetting) {
		this.itemSetting = itemSetting;
	}

	/**
	 * @return the list
	 */
	public List<Map<String, Object>> getList() {
		return list;
	}

	/**
	 * @param list the list to set
	 */
	public void setList(List<Map<String, Object>> list) {
		this.list = list;
	}

	/**
	 * @return the mapSet
	 */
	public Map<String, Object> getMapSet() {
		return mapSet;
	}

	/**
	 * @param mapSet the mapSet to set
	 */
	public void setMapSet(Map<String, Object> mapSet) {
		this.mapSet = mapSet;
	}

	/**
	 * @return the letter
	 */
	public String getLetter() {
		return letter;
	}

	/**
	 * @param letter the letter to set
	 */
	public void setLetter(String letter) {
		this.letter = letter;
	}

	/**
	 * @return the answer
	 */
	public QuestionnaireAnswer getAnswer() {
		return answer;
	}

	/**
	 * @param answer the answer to set
	 */
	public void setAnswer(QuestionnaireAnswer answer) {
		this.answer = answer;
	}
	
}